package com.lg.algorithm.collections.list.my;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 创建 单向链表
 * 1 2 3 null
 */
public class Mian {
    public static void main(String[] args) {
        SingleNode singleList0 = SingleList.createSingleList(0);
        SingleNode singleList1 = SingleList.createSingleList(1);
        SingleNode singleList2 = SingleList.createSingleList(Arrays.asList(1,2,3,4));
        SingleList.printList(singleList0);
        SingleList.printList(singleList1);
        SingleList.printList(singleList2);

        SingleNode reverse = SingleList.reverse(singleList2);
        SingleList.printList(reverse);
        System.out.println("-----------------");

        SingleNode singleList22 = SingleList.createSingleList(Arrays.asList(1,2,3,4));
        SingleList.printCombination(singleList22,3);

        System.out.println("----------输出组合--------");
        SingleList.printCombination2(Arrays.asList(1,2,3,4),2,new ArrayList<>());

    }
}
